<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmDrawerItemWidget.cpp -->
  <title>QCtmDrawerItemWidget Class | QCustomUi 1.10.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.10.0</a></li>
<li><a href="index.html">QCustomUi</a></li>
<li>QCtmDrawerItemWidget</li>
<li id="buildversion">QCustomUi 1.10.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QCtmDrawerItemWidget Class</h1>
<!-- $$$QCtmDrawerItemWidget-brief -->
<p>抽屉窗口 <a href="qctmdrawerwidget.html">QCtmDrawerWidget</a> 的抽屉项. <a href="#details">More...</a></p>
<!-- @@@QCtmDrawerItemWidget -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmDrawerItemWidget.h&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> QWidget</td></tr></table></div>
<ul>
<li><a href="qctmdraweritemwidget-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#actionAt">actionAt</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#addAction">addAction</a></b>(const QIcon &amp;<i>icon</i>, const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#addAction-1">addAction</a></b>(const QIcon &amp;<i>icon</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#addAction-2">addAction</a></b>(const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#count">count</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QSize &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#iconSize">iconSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#indexOf">indexOf</a></b>(QAction *<i>action</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#insertAction-1">insertAction</a></b>(int <i>index</i>, const QIcon &amp;<i>icon</i>, const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#insertAction-2">insertAction</a></b>(int <i>index</i>, const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#isExpand">isExpand</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#removeAction">removeAction</a></b>(QAction *<i>action</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#setExpand">setExpand</a></b>(bool <i>expand</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#setIconSize">setIconSize</a></b>(const QSize &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#setTitle">setTitle</a></b>(const QString &amp;<i>title</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#setWidget">setWidget</a></b>(QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#title">title</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#widget">widget</a></b>() const</td></tr>
</table></div>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#expandChanged">expandChanged</a></b>(bool <i>expand</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#iconSizeChanged">iconSizeChanged</a></b>(const QSize &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#titleClicked">titleClicked</a></b>(bool <i>expand</i>)</td></tr>
</table></div>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#QCtmDrawerItemWidget">QCtmDrawerItemWidget</a></b>(const QString &amp;<i>title</i>, QCtmDrawerWidget *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmdraweritemwidget.html#dtor.QCtmDrawerItemWidget">~QCtmDrawerItemWidget</a></b>()</td></tr>
</table></div>
<!-- $$$QCtmDrawerItemWidget-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p><b>抽屉窗口的截图，抽屉项为其中一栏:</b></p>
<p class="centerAlign"><img src="images/QCtmDrawerWidgetDetail.png" alt="" /></p></div>
<!-- @@@QCtmDrawerItemWidget -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmDrawerItemWidget[overload1]$$$QCtmDrawerItemWidgetconstQString&QCtmDrawerWidget* -->
<h3 class="fn" id="QCtmDrawerItemWidget"><code>[protected] </code>QCtmDrawerItemWidget::<span class="name">QCtmDrawerItemWidget</span>(const <span class="type"><a href="https://doc.qt.io/qt/qstring.html">QString</a></span> &amp;<i>title</i>, <span class="type"><a href="qctmdrawerwidget.html">QCtmDrawerWidget</a></span> *<i>parent</i>)</h3>
<p>构造一个标题为 <i>title</i>, 父窗口为 <i>parent</i> 的抽屉窗口.</p>
<!-- @@@QCtmDrawerItemWidget -->
<!-- $$$expandChanged[overload1]$$$expandChangedbool -->
<h3 class="fn" id="expandChanged"><code>[signal] </code><span class="type">void</span> QCtmDrawerItemWidget::<span class="name">expandChanged</span>(<span class="type">bool</span> <i>expand</i>)</h3>
<p>当抽屉项的扩展状态发生变化时，发送该信号 <i>expand</i>.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#titleClicked">QCtmDrawerItemWidget::titleClicked</a>.</p>
<!-- @@@expandChanged -->
<!-- $$$iconSizeChanged -->
<h3 class="fn" id="iconSizeChanged"><code>[signal] </code><span class="type">void</span> QCtmDrawerItemWidget::<span class="name">iconSizeChanged</span>(const <span class="type"><a href="https://doc.qt.io/qt/qsize.html">QSize</a></span> &amp;<i>size</i>)</h3>
<p>当Action的图标大小发生改变时发送该信号 <i>size</i>.</p>
<p><b>Note: </b>Notifier signal for property <a href="qctmdraweritemwidget.html#iconSize">iconSize</a>. </p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#setIconSize">QCtmDrawerItemWidget::setIconSize</a>.</p>
<!-- @@@iconSizeChanged -->
<!-- $$$titleClicked[overload1]$$$titleClickedbool -->
<h3 class="fn" id="titleClicked"><code>[signal] </code><span class="type">void</span> QCtmDrawerItemWidget::<span class="name">titleClicked</span>(<span class="type">bool</span> <i>expand</i>)</h3>
<p>当抽屉项的标题栏被点击时发送该信号 <i>expand</i>.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#expandChanged">QCtmDrawerItemWidget::expandChanged</a>.</p>
<!-- @@@titleClicked -->
<!-- $$$~QCtmDrawerItemWidget[overload1]$$$~QCtmDrawerItemWidget -->
<h3 class="fn" id="dtor.QCtmDrawerItemWidget"><code>[virtual protected] </code>QCtmDrawerItemWidget::<span class="name">~QCtmDrawerItemWidget</span>()</h3>
<p>销毁该抽屉项对象.</p>
<!-- @@@~QCtmDrawerItemWidget -->
<!-- $$$actionAt[overload1]$$$actionAtint -->
<h3 class="fn" id="actionAt"><span class="type"><a href="https://doc.qt.io/qt/qaction.html">QAction</a></span> *QCtmDrawerItemWidget::<span class="name">actionAt</span>(<span class="type">int</span> <i>index</i>)</h3>
<p>返回 <i>index</i> 位置的Action.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#indexOf">indexOf</a>.</p>
<!-- @@@actionAt -->
<!-- $$$addAction[overload1]$$$addActionconstQIcon&constQString& -->
<h3 class="fn" id="addAction"><span class="type"><a href="https://doc.qt.io/qt/qaction.html">QAction</a></span> *QCtmDrawerItemWidget::<span class="name">addAction</span>(const <span class="type"><a href="https://doc.qt.io/qt/qicon.html">QIcon</a></span> &amp;<i>icon</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>在标题栏上添加一个图标为 <i>icon</i> 文本为 <i>text</i> 的Action.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#insertAction-1">insertAction</a> and <a href="qctmdraweritemwidget.html#removeAction">removeAction</a>.</p>
<!-- @@@addAction -->
<!-- $$$addAction$$$addActionconstQIcon& -->
<h3 class="fn" id="addAction-1"><span class="type"><a href="https://doc.qt.io/qt/qaction.html">QAction</a></span> *QCtmDrawerItemWidget::<span class="name">addAction</span>(const <span class="type"><a href="https://doc.qt.io/qt/qicon.html">QIcon</a></span> &amp;<i>icon</i>)</h3>
<p>This function overloads addAction.</p>
<p>在标题栏上添加一个图标为 <i>icon</i> 的Action.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#insertAction-1">insertAction</a> and <a href="qctmdraweritemwidget.html#removeAction">removeAction</a>.</p>
<!-- @@@addAction -->
<!-- $$$addAction$$$addActionconstQString& -->
<h3 class="fn" id="addAction-2"><span class="type"><a href="https://doc.qt.io/qt/qaction.html">QAction</a></span> *QCtmDrawerItemWidget::<span class="name">addAction</span>(const <span class="type"><a href="https://doc.qt.io/qt/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>This function overloads addAction.</p>
<p>在标题栏上添加一个文本为 <i>text</i> 的Action.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#addAction">QCtmDrawerItemWidget::addAction</a> and <a href="qctmdraweritemwidget.html#removeAction">removeAction</a>.</p>
<!-- @@@addAction -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn" id="count"><span class="type">int</span> QCtmDrawerItemWidget::<span class="name">count</span>() const</h3>
<p>返回Action的数量.</p>
<!-- @@@count -->
<!-- $$$iconSize -->
<h3 class="fn" id="iconSize">const <span class="type"><a href="https://doc.qt.io/qt/qsize.html">QSize</a></span> &amp;QCtmDrawerItemWidget::<span class="name">iconSize</span>() const</h3>
<p>返回Action的大小.</p>
<p><b>Note: </b>Getter function for property iconSize. </p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#setIconSize">setIconSize</a>.</p>
<!-- @@@iconSize -->
<!-- $$$indexOf[overload1]$$$indexOfQAction* -->
<h3 class="fn" id="indexOf"><span class="type">int</span> QCtmDrawerItemWidget::<span class="name">indexOf</span>(<span class="type"><a href="https://doc.qt.io/qt/qaction.html">QAction</a></span> *<i>action</i>)</h3>
<p>返回 <i>action</i> 的位置.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#actionAt">actionAt</a>.</p>
<!-- @@@indexOf -->
<!-- $$$insertAction$$$insertActionintconstQIcon&constQString& -->
<h3 class="fn" id="insertAction-1"><span class="type"><a href="https://doc.qt.io/qt/qaction.html">QAction</a></span> *QCtmDrawerItemWidget::<span class="name">insertAction</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="https://doc.qt.io/qt/qicon.html">QIcon</a></span> &amp;<i>icon</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>This function overloads insertAction.</p>
<p>在标题栏上的 <i>index</i> 位置插入一个图标为 <i>icon</i> 文本为 <i>text</i> 的Action.</p>
<p><b>See also </b>QCtmDrawerItemWidget::insertAction and <a href="qctmdraweritemwidget.html#removeAction">removeAction</a>.</p>
<!-- @@@insertAction -->
<!-- $$$insertAction$$$insertActionintconstQString& -->
<h3 class="fn" id="insertAction-2"><span class="type"><a href="https://doc.qt.io/qt/qaction.html">QAction</a></span> *QCtmDrawerItemWidget::<span class="name">insertAction</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>This function overloads insertAction.</p>
<p>在标题栏上的 <i>index</i> 位置插入一个文本为 <i>text</i> 的Action.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#insertAction-1">QCtmDrawerItemWidget::insertAction</a> and <a href="qctmdraweritemwidget.html#removeAction">removeAction</a>.</p>
<!-- @@@insertAction -->
<!-- $$$isExpand[overload1]$$$isExpand -->
<h3 class="fn" id="isExpand"><span class="type">bool</span> QCtmDrawerItemWidget::<span class="name">isExpand</span>() const</h3>
<p>返回该抽屉项的展开状态.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#setExpand">setExpand</a>.</p>
<!-- @@@isExpand -->
<!-- $$$removeAction[overload1]$$$removeActionQAction* -->
<h3 class="fn" id="removeAction"><span class="type">void</span> QCtmDrawerItemWidget::<span class="name">removeAction</span>(<span class="type"><a href="https://doc.qt.io/qt/qaction.html">QAction</a></span> *<i>action</i>)</h3>
<p>移除给予的 <i>action</i>.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#addAction">addAction</a> and <a href="qctmdraweritemwidget.html#insertAction-1">insertAction</a>.</p>
<!-- @@@removeAction -->
<!-- $$$setExpand[overload1]$$$setExpandbool -->
<h3 class="fn" id="setExpand"><span class="type">void</span> QCtmDrawerItemWidget::<span class="name">setExpand</span>(<span class="type">bool</span> <i>expand</i>)</h3>
<p>设置该抽屉项的展开状态 <i>expand</i>.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#isExpand">isExpand</a>.</p>
<!-- @@@setExpand -->
<!-- $$$setIconSize -->
<h3 class="fn" id="setIconSize"><span class="type">void</span> QCtmDrawerItemWidget::<span class="name">setIconSize</span>(const <span class="type"><a href="https://doc.qt.io/qt/qsize.html">QSize</a></span> &amp;<i>size</i>)</h3>
<p>设置Action的大小 <i>size</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmdraweritemwidget.html#iconSize">iconSize</a>. </p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#iconSize">iconSize</a>.</p>
<!-- @@@setIconSize -->
<!-- $$$setTitle[overload1]$$$setTitleconstQString& -->
<h3 class="fn" id="setTitle"><span class="type">void</span> QCtmDrawerItemWidget::<span class="name">setTitle</span>(const <span class="type"><a href="https://doc.qt.io/qt/qstring.html">QString</a></span> &amp;<i>title</i>)</h3>
<p>设置抽屉项的标题 <i>title</i>.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#title">title</a>().</p>
<!-- @@@setTitle -->
<!-- $$$setWidget[overload1]$$$setWidgetQWidget* -->
<h3 class="fn" id="setWidget"><span class="type">void</span> QCtmDrawerItemWidget::<span class="name">setWidget</span>(<span class="type">QWidget</span> *<i>widget</i>)</h3>
<p>设置抽屉项容纳的部件 <i>widget</i>.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#widget">widget</a>().</p>
<!-- @@@setWidget -->
<!-- $$$title[overload1]$$$title -->
<h3 class="fn" id="title"><span class="type"><a href="https://doc.qt.io/qt/qstring.html">QString</a></span> QCtmDrawerItemWidget::<span class="name">title</span>() const</h3>
<p>返回抽屉项的标题.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#setTitle">setTitle</a>.</p>
<!-- @@@title -->
<!-- $$$widget[overload1]$$$widget -->
<h3 class="fn" id="widget"><span class="type">QWidget</span> *QCtmDrawerItemWidget::<span class="name">widget</span>() const</h3>
<p>返回该抽屉项容纳的部件.</p>
<p><b>See also </b><a href="qctmdraweritemwidget.html#setWidget">setWidget</a>.</p>
<!-- @@@widget -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
